# coding: utf-8
from flask_sqlalchemy import SQLAlchemy


db = SQLAlchemy()



class UserInfo(db.Model):
    __tablename__ = 'user_info'

    AutoID = db.Column(db.BigInteger, primary_key=True, info='主键 自动递增')
    UserID = db.Column(db.String(100), nullable=False, server_default=db.FetchedValue(), info='业务主键，查询用户使用')
    Account = db.Column(db.String(100, 'utf8mb4_0900_ai_ci'), nullable=False, info='账户')
    Password = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), info='密码')
    FaceImg = db.Column(db.String(300, 'utf8mb4_0900_ai_ci'), info='头像url')
    UserNickName = db.Column(db.String(50, 'utf8mb4_0900_ai_ci'), info='用户昵称，限制10个')
    UserType = db.Column(db.Integer, server_default=db.FetchedValue(), info='用户类型，0为普通用户，1为管理员')
    IsDelete = db.Column(db.Integer, server_default=db.FetchedValue(), info='状态0-正常，1-删除')
    CreateTime = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建的时间')
    ModifyTime = db.Column(db.DateTime, server_default=db.FetchedValue())
